import { defineStore } from 'pinia'

export const useCounterStore = defineStore('counter', {
  state: ()=>{
    return {
      count: 123
    }
  },
  actions:{
    add(){
      this.count ++
    }
  },
  persist: {
    enabled: true,
    strategies: [
      {
        key:'countStore',
        storage: localStorage,
        paths: ['count']
      }
    ]
  }
})
